/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package afroschool.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author AUTRES
 */
@Entity
@Table(name = "regledisciplinaire")
@NamedQueries({@NamedQuery(name = "Regledisciplinaire.findByCode", query = "SELECT r FROM Regledisciplinaire r WHERE r.code = :code"), @NamedQuery(name = "Regledisciplinaire.findByIntitule", query = "SELECT r FROM Regledisciplinaire r WHERE r.intitule = :intitule"), @NamedQuery(name = "Regledisciplinaire.findByDesctiption", query = "SELECT r FROM Regledisciplinaire r WHERE r.desctiption = :desctiption")})
public class Regledisciplinaire implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "code", nullable = false)
    private String code;
    @Column(name = "intitule")
    private String intitule;
    @Column(name = "desctiption")
    private String desctiption;

    public Regledisciplinaire() {
    }

    public Regledisciplinaire(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIntitule() {
        return intitule;
    }

    public void setIntitule(String intitule) {
        this.intitule = intitule;
    }

    public String getDesctiption() {
        return desctiption;
    }

    public void setDesctiption(String desctiption) {
        this.desctiption = desctiption;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (code != null ? code.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Regledisciplinaire)) {
            return false;
        }
        Regledisciplinaire other = (Regledisciplinaire) object;
        if ((this.code == null && other.code != null) || (this.code != null && !this.code.equals(other.code))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "afroschool.beans.Regledisciplinaire[code=" + code + "]";
    }

}
